@import "variables";

#carousel {
  .carousel-slide {
    position: relative;
    background-color: $alto;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;

    &::before {
      content: "";
      display: block;
      width: 100%;
      height: 0;
    }

    &::after {
      content: "";
      display: block;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: $alto;
      opacity: 0.7;
    }

    &.slick-current,
    &.slick-active {
      &::after {
        width: 0;
        height: 0;
      }
    }

    .carousel-title {
      display: block;
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      background-color: rgba(0, 0, 0, 0.67);
      color: #fff;
    }
  }
}

@media (max-width: 767px) {
  #carousel {
    .carousel-slide {
      &::before {
        padding-top: 43.75%;
      }

      .carousel-title {
        height: 40px;
        font-size: 14px;
        padding: 0 20px;
        line-height: 40px;
      }
    }
  }
}

@media (min-width: 768px) {
  #carousel {
    .carousel-slide {
      &::before {
        padding-top: 39.06%;
      }

      .carousel-title {
        height: 80px;
        font-size: 18px;
        padding: 0 30px;
        line-height: 80px;
      }
    }
  }
}

@media (min-width: 1140px) {
  #carousel {
    .carousel-slide {
      width: 1120px;

      &::before {
        padding-top: 35.714%;
      }

      .carousel-title {
        height: 110px;
        font-size: 24px;
        padding: 0 50px;
        line-height: 110px;
      }
    }
  }
}
